<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        const HeimaComponent = {
            data: {
                name: 'tom'
            },
            showMsg() {
                console.log(this.data.name)
            }
        }
        
        const heima1 = HeimaComponent;
        heima1.showMsg();
        heima1.data.name = 'jake'
        
        const heima2 = HeimaComponent;
        heima2.showMsg()

    </script>
</head>
<body>
    
</body>
</html>